package com.huanguo.dashboard.bean

/**
 * 锁车系统数据
 * 数据canId = 18FF5527
 */
class DashBoardLockBean {
    var secretCodeH1: Int = 0 // 申请码 密文H1 byte[0]
    var secretCodeH2: Int = 0 // 申请码 密文H2 byte[1]
    var secretCodeH3: Int = 0 // 申请码 密文H3 byte[2]
    var keyMatchingStatus: Boolean = false // 密钥匹配状态 byte[3] bit[7]
    var temporarilyUnlockedStatus: Boolean = false // 临时解锁状态 byte[4] bit[0]
    var permanentlyUnlockedStatus: Boolean = false // 永久解锁状态 byte[4] bit[1]
    var passiveLockStatus: Boolean = false // 被动锁车状态 byte[4] bit[2]
    var forcedLockStatus: Boolean = false // 强制锁车状态 byte[4] bit[3]
    var levelOneLockStatus: Boolean = false // 一级锁车状态 byte[3] bit[5]
    var triggerFinalLock: Boolean = false // 触发最终锁车 byte[4] bit[4]
    var interpolationLockStatus: Boolean = false // 已锁插值部状态 byte[4] bit[5]
    var engineLockStatus: Boolean = false // 已锁发动机状态 byte[4] bit[6]
    var gpsStatus: Boolean = false // GPS通讯正常 byte[4] bit[7]

    override fun toString(): String {
        return "secretCodeH1: $secretCodeH1, secretCodeH2: $secretCodeH2, secretCodeH3: $secretCodeH3, keyMatchingStatus: $keyMatchingStatus" +
                " temporarilyUnlockedStatus $temporarilyUnlockedStatus, permanentlyUnlockedStatus: $permanentlyUnlockedStatus, passiveLockStatus: $passiveLockStatus" +
                " forcedLockStatus $forcedLockStatus, levelOneLockStatus: $levelOneLockStatus, triggerFinalLock: $triggerFinalLock, interpolationLockStatus: $interpolationLockStatus" +
                " engineLockStatus: $engineLockStatus, gpsStatus: $gpsStatus"
    }
}